import request from "@/utils/request";

// 轮播列表
const BannerList = (params) => {
    return request({
        url: "/banners",
        params: {
            ...params
        }
    });
};

// 轮播添加
const BannerAdd = (data) => {
    return request({
        url: "/banners",
        method: "post",
        data: data
    });
};

// 轮播删除
const BannerDelete = (id) => {
    return request({
        url: `/banners/${id}`,
        method: "delete"
    });
};

// 轮播修改
const BannerUpdate = (id, data) => {
    return request({
        url: `/banners/${id}`,
        method: "patch",
        data: data
    });
};
export { BannerList, BannerAdd, BannerDelete, BannerUpdate };
